<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: libemb::LineBuffer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>libemb</b></li><li class="navelem"><a class="el" href="classlibemb_1_1_line_buffer.html">LineBuffer</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlibemb_1_1_line_buffer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libemb::LineBuffer Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>线性缓冲  
 <a href="classlibemb_1_1_line_buffer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_data_buffer_8h_source.html">DataBuffer.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for libemb::LineBuffer:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classlibemb_1_1_line_buffer.png" usemap="#libemb::LineBuffer_map" alt=""/>
  <map id="libemb::LineBuffer_map" name="libemb::LineBuffer_map">
<area href="classlibemb_1_1_data_buffer.html" alt="libemb::DataBuffer" shape="rect" coords="0,0,115,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acdb9c6218b724a671e07834097fe0b5c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_line_buffer.html#acdb9c6218b724a671e07834097fe0b5c">init</a> (int <a class="el" href="classlibemb_1_1_line_buffer.html#a20b22d4fe489e2f88d3259fb90887d7b">capacity</a>) override</td></tr>
<tr class="memdesc:acdb9c6218b724a671e07834097fe0b5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化  <a href="classlibemb_1_1_line_buffer.html#acdb9c6218b724a671e07834097fe0b5c">More...</a><br /></td></tr>
<tr class="separator:acdb9c6218b724a671e07834097fe0b5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af913c29a8fd8ccb0ea5998b93600b6d5"><td class="memItemLeft" align="right" valign="top"><a id="af913c29a8fd8ccb0ea5998b93600b6d5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_line_buffer.html#af913c29a8fd8ccb0ea5998b93600b6d5">clear</a> () override</td></tr>
<tr class="memdesc:af913c29a8fd8ccb0ea5998b93600b6d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">清空缓冲区 <br /></td></tr>
<tr class="separator:af913c29a8fd8ccb0ea5998b93600b6d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20b22d4fe489e2f88d3259fb90887d7b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_line_buffer.html#a20b22d4fe489e2f88d3259fb90887d7b">capacity</a> () override</td></tr>
<tr class="memdesc:a20b22d4fe489e2f88d3259fb90887d7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取总容量  <a href="classlibemb_1_1_line_buffer.html#a20b22d4fe489e2f88d3259fb90887d7b">More...</a><br /></td></tr>
<tr class="separator:a20b22d4fe489e2f88d3259fb90887d7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3f5cb4d3ab4e86fa92bab8774ebee8a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_line_buffer.html#ae3f5cb4d3ab4e86fa92bab8774ebee8a">space</a> () override</td></tr>
<tr class="memdesc:ae3f5cb4d3ab4e86fa92bab8774ebee8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取剩余空间  <a href="classlibemb_1_1_line_buffer.html#ae3f5cb4d3ab4e86fa92bab8774ebee8a">More...</a><br /></td></tr>
<tr class="separator:ae3f5cb4d3ab4e86fa92bab8774ebee8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d176822bd15091d7b4e8dcf94248342"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_line_buffer.html#a6d176822bd15091d7b4e8dcf94248342">size</a> () override</td></tr>
<tr class="memdesc:a6d176822bd15091d7b4e8dcf94248342"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取实际存储的数据长度  <a href="classlibemb_1_1_line_buffer.html#a6d176822bd15091d7b4e8dcf94248342">More...</a><br /></td></tr>
<tr class="separator:a6d176822bd15091d7b4e8dcf94248342"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a232ec66c334aa2aeba4866c6bfdac77a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_line_buffer.html#a232ec66c334aa2aeba4866c6bfdac77a">putData</a> (char *data, int <a class="el" href="classlibemb_1_1_line_buffer.html#a6d176822bd15091d7b4e8dcf94248342">size</a>) override</td></tr>
<tr class="memdesc:a232ec66c334aa2aeba4866c6bfdac77a"><td class="mdescLeft">&#160;</td><td class="mdescRight">放入数据  <a href="classlibemb_1_1_line_buffer.html#a232ec66c334aa2aeba4866c6bfdac77a">More...</a><br /></td></tr>
<tr class="separator:a232ec66c334aa2aeba4866c6bfdac77a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fc7b5846127b085bdb224d1eb24794a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_line_buffer.html#a6fc7b5846127b085bdb224d1eb24794a">getData</a> (char *buf, int <a class="el" href="classlibemb_1_1_line_buffer.html#a6d176822bd15091d7b4e8dcf94248342">size</a>) override</td></tr>
<tr class="memdesc:a6fc7b5846127b085bdb224d1eb24794a"><td class="mdescLeft">&#160;</td><td class="mdescRight">取出数据  <a href="classlibemb_1_1_line_buffer.html#a6fc7b5846127b085bdb224d1eb24794a">More...</a><br /></td></tr>
<tr class="separator:a6fc7b5846127b085bdb224d1eb24794a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bfa9683de610bb449d6f649acd28396"><td class="memItemLeft" align="right" valign="top"><a id="a9bfa9683de610bb449d6f649acd28396"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>find</b> (char *str, int <a class="el" href="classlibemb_1_1_line_buffer.html#a6d176822bd15091d7b4e8dcf94248342">size</a>)</td></tr>
<tr class="separator:a9bfa9683de610bb449d6f649acd28396"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1282eda53b6c26062e783e44333ed352"><td class="memItemLeft" align="right" valign="top"><a id="a1282eda53b6c26062e783e44333ed352"></a>
char&#160;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (int idx)</td></tr>
<tr class="separator:a1282eda53b6c26062e783e44333ed352"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>线性缓冲 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a20b22d4fe489e2f88d3259fb90887d7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20b22d4fe489e2f88d3259fb90887d7b">&#9670;&nbsp;</a></span>capacity()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::LineBuffer::capacity </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取总容量 </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

<p>Implements <a class="el" href="classlibemb_1_1_data_buffer.html#a288719b0bfc58ba851b456361c95f58b">libemb::DataBuffer</a>.</p>

</div>
</div>
<a id="a6fc7b5846127b085bdb224d1eb24794a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fc7b5846127b085bdb224d1eb24794a">&#9670;&nbsp;</a></span>getData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::LineBuffer::getData </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>取出数据 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td></td></tr>
    <tr><td class="paramname">bytes</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

<p>Implements <a class="el" href="classlibemb_1_1_data_buffer.html#a42d055d788c1149977fee3e6212d9a07">libemb::DataBuffer</a>.</p>

</div>
</div>
<a id="acdb9c6218b724a671e07834097fe0b5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acdb9c6218b724a671e07834097fe0b5c">&#9670;&nbsp;</a></span>init()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::LineBuffer::init </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>capacity</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>初始化 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">capacity</td><td>容量 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

<p>Implements <a class="el" href="classlibemb_1_1_data_buffer.html#a989d812bd37094689c4a09bec5dad0ac">libemb::DataBuffer</a>.</p>

</div>
</div>
<a id="a232ec66c334aa2aeba4866c6bfdac77a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a232ec66c334aa2aeba4866c6bfdac77a">&#9670;&nbsp;</a></span>putData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::LineBuffer::putData </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>放入数据 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td></td></tr>
    <tr><td class="paramname">bytes</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

<p>Implements <a class="el" href="classlibemb_1_1_data_buffer.html#a3300fecf65bebf7c3e207ebcdc8f0344">libemb::DataBuffer</a>.</p>

</div>
</div>
<a id="a6d176822bd15091d7b4e8dcf94248342"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d176822bd15091d7b4e8dcf94248342">&#9670;&nbsp;</a></span>size()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::LineBuffer::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取实际存储的数据长度 </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

<p>Implements <a class="el" href="classlibemb_1_1_data_buffer.html#a929e2a0febf4fb13d7893a1c82ca3be6">libemb::DataBuffer</a>.</p>

</div>
</div>
<a id="ae3f5cb4d3ab4e86fa92bab8774ebee8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3f5cb4d3ab4e86fa92bab8774ebee8a">&#9670;&nbsp;</a></span>space()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::LineBuffer::space </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取剩余空间 </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

<p>Implements <a class="el" href="classlibemb_1_1_data_buffer.html#a88c1443770a58a2e0c042dea8145ed63">libemb::DataBuffer</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_data_buffer_8h_source.html">DataBuffer.h</a></li>
<li>src/DataBuffer.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
